Skip to content

FFL-2510: Add allocationKey to ResolutionDetails and thread to OpenFeature metadata#3570

Draft
typotter wants to merge 3 commits into
developfrom
typo/FFL-2510-allocationKey-top-level-resolution-details
Draft

FFL-2510: Add allocationKey to ResolutionDetails and thread to OpenFeature metadata#3570
typotter wants to merge 3 commits into
developfrom
typo/FFL-2510-allocationKey-top-level-resolution-details

Conversation

@typotter

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds allocationKey as a top-level field on ResolutionDetails and threads it into OpenFeature ProviderEvaluation metadata under the key "allocationKey" when non-null. Existing flagMetadata/extraLogging fields preserved for backwards compatibility.

Motivation

FFL-2510 — promotes allocationKey to a top-level field on our own ResolutionDetails struct, making it directly accessible without digging into metadata maps.

Additional Notes

N/A

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

typotter added 3 commits June 23, 2026 12:31
Remove dead extractMetadata (duplicate of buildMetadata, no callers).
In toEvaluationMetadata, iterate flagMetadata first then write
allocationKey last so typed field always wins over any flagMetadata
"allocationKey" entry. Add combined allocationKey+flagMetadata test
and collision test to ConvertersTest.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.55%. Comparing base (2248829) to head (d9b4185).

Files with missing lines Patch % Lines
.../flags/openfeature/internal/adapters/Converters.kt 66.67% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3570      +/-   ##
===========================================
+ Coverage    72.53%   72.55%   +0.02%     
===========================================
  Files          978      978              
  Lines        36058    36060       +2     
  Branches      6041     6042       +1     
===========================================
+ Hits         26152    26162      +10     
+ Misses        8234     8232       -2     
+ Partials      1672     1666       -6     
Files with missing lines Coverage Δ
...tadog/android/flags/internal/DatadogFlagsClient.kt 91.72% <100.00%> (-0.05%) ⬇️
...m/datadog/android/flags/model/ResolutionDetails.kt 100.00% <100.00%> (ø)
.../flags/openfeature/internal/adapters/Converters.kt 80.00% <66.67%> (-2.14%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants